<template>
  <div class="PersonalCenter">
    <div class="header">
      <div class="header-left">
        <img class="picture" src="../assets/shangchuan.png" alt />
        <div class="profile">
          <img src="../assets/shangchuan.png" alt />
        </div>
      </div>
      <div class="header-center">
        <p>
          <span style="width: 80px">用户名：</span>
          <span>
            <span v-if="text">{{ name }}</span>
            <el-input v-if="show" v-model="name" style="width: 200px"></el-input>
            <img style="margin-left: 10px" @click="phanerozoite" src="../assets/yonghuming.png" alt />
          </span>
        </p>
        <p>
          <span style="width: 80px">会员ID：</span>
          <span>15012312300</span>
        </p>
        <p>
          <span style="width: 80px">到期时间：</span>
          <span>2013-05-10</span>
        </p>
      </div>
      <div class="header-right">
        <p>
          <span style="width: 80px">会员状态：</span>
          <span class="online">已上线</span>
          <!-- <span class="expire">到期</span>
          <span class="banned">封禁</span>-->
        </p>
        <p>
          <span style="width: 80px">会员类别：</span>
          <span>主任</span>
          <span class="upgrade">升级会员</span>
        </p>
        <p>
          <span style="width: 80px">手机号码：</span>
          <span>150******00</span>
          <span class="amend">修改</span>
        </p>
      </div>
    </div>
    <div class="tabList">
      <!-- <el-tabs v-model="activeName" type="border-card" class="tabs" :before-leave="beforeLeave">
        <el-tab-pane name="MyGroup" label="我的团队">
          <div class="menulist">
            <ul>
              <li
                class="nav"
                :class="{ active: currentIndex === index }"
                v-for="(item, index) in menu"
                :key="index"
                @click="liClick(index)"
              >{{ item.name }}</li>
            </ul>
          </div>
        </el-tab-pane>
        <el-tab-pane name="SettingUp" label="设置">设置</el-tab-pane>
      </el-tabs>-->
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: "王力群ABCabc ",
      text: true,
      show: false,
      activeName: "MyGroup",
      menu: [
        { id: 1, name: "全部" },
        { id: 2, name: "投研" },
        { id: 3, name: "券商" },
        { id: 4, name: "已沟通(普通会员)" },
        { id: 5, name: "待沟通(普通会员)" },
        { id: 6, name: "试用中" }
      ],
      currentIndex: 0
    };
  },
  methods: {
    phanerozoite() {
      if (this.text == true) {
        this.text = false;
        this.show = true;
      } else {
        this.text = true;
        this.show = false;
      }
    },
    // 导航搜索
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
    liClick(index) {
      this.currentIndex = index;
    }
  }
};
</script>

<style lang="less" scoped>
.PersonalCenter {
  background: #f5f7fa;
  padding: 20px;
  height: 100%;
  box-sizing: border-box;
  .header {
    width: 100%;
    height: 143px;
    background-color: #fff;
    border-radius: 10px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    .header-left {
      margin-left: 74px;
      position: relative;
      .picture {
        width: 100px;
        height: 100px;
        border-radius: 50%;
      }
      .profile {
        position: absolute;
        bottom: 0px;
        right: 0px;
      }
    }
    .header-center {
      margin-left: 60px;
      text-align: left;
      color: #4e5969;
      font-size: 14px;
      p {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        span:last-child {
          color: #1d2129;
        }
      }
    }
    .header-right {
      margin-left: 116px;
      text-align: left;
      color: #4e5969;
      font-size: 14px;
      p {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        .online {
          width: 52px;
          height: 20px;
          border-radius: 2px;
          background-color: #e8ffea;
          color: #00b42a;
          text-align: center;
        }
        .expire {
          width: 52px;
          height: 20px;
          border-radius: 2px;
          background-color: #81abff;
          color: #1b67ff;
          text-align: center;
        }
        .banned {
          width: 52px;
          height: 20px;
          border-radius: 2px;
          background-color: #fbb8b8;
          color: #f20f0f;
          text-align: center;
        }
        .upgrade {
          color: #165dff;
          padding-left: 60px;
        }
        .amend {
          color: #165dff;
          padding-left: 10px;
        }
      }
    }
  }
  .tabList {
    margin: 16px 0 30px 0;
    background-color: #fff;
    width: 100%;
    height: auto;
    border-radius: 10px;
    .el-tabs--border-card {
      border-radius: 10px;
      border: none;
    }
    .tabs {
      .menulist {
        ul {
          display: flex;
          flex-wrap: wrap;
          margin-left: -37px;
          .nav {
            list-style: none;
            margin-right: 15px;
            height: 30px;
            color: #666666;
            font-size: 16px;
          }
          .active {
            color: #3377ff;
            border-bottom: 1px solid #3377ff;
          }
        }
      }
    }
  }
}
</style>
<style scoped>
.tabs >>> .el-tabs__content {
  padding: 0 16px 16px 16px;
}

.tabs >>> .el-tabs__header {
  border-bottom: none !important;
  background-color: #fff !important;
  border-radius: 10px 10px 0 0;
}

.tabs >>> .el-tabs__item.is-active {
  background: rgba(51, 119, 255, 0.06);
  border: 1px solid #3377ff;
  color: #3377ff;
}

.tabs >>> .el-tabs__item {
  padding: 0 !important;
  width: 100px;
  height: 34px;
  line-height: 34px;
  border: 1px solid #ccc;
  margin: 16px 0 16px 16px !important;
  /* background: #F5F5F5; */
  border-radius: 3px;
  font-size: 16px;
}

.el-table >>> tr {
  color: #1e2024;
}

.el-checkbox-button.is-checked .el-checkbox-button__inner {
  border-radius: 0;
}
</style>
